package com.itheima.day06;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class Test6 {
    public static void main(String[] args) {
        Map<String,String> basicClass=new HashMap<>();
        basicClass.put("001", "李晨");
        basicClass.put("002", "范冰冰");

        Map<String,String> employmentClass=new HashMap<>();
        employmentClass.put("001","马云");
        employmentClass.put("002","马化腾");

        Map<String,Map<String,String>> school=new HashMap<>();
        school.put("java基础班",basicClass);
        school.put("java就业班",employmentClass);

        Set<String> keySet = school.keySet();
        for (String s : keySet) {
            System.out.println(s);
            Map<String, String> map = school.get(s);
            Set<String> set = map.keySet();
            for (String s1 : set) {
                System.out.println(s1+"-----"+map.get(s1));
            }
        }
        System.out.println("-------");
        Set<Map.Entry<String, Map<String, String>>> classrooms = school.entrySet();
        for (Map.Entry<String, Map<String, String>> classroom : classrooms) {
            System.out.println(classroom.getKey());
            Set<Map.Entry<String, String>> students = classroom.getValue().entrySet();
            for (Map.Entry<String, String> student : students) {
                System.out.println(student.getKey()+"---"+student.getValue());
            }
        }


    }
}
